﻿using System;
using System.Collections.Generic;
using System.Web;
using OpenWaves.Web.Controls;

namespace OpenWaves.EPiServer.Controls
{
    [Obsolete("Use NavigationView with Model property set to instance of EPiNavigationViewModel.", false)]
    public class EPiNavigation<T> : NavigationView<T> where T : IEPiNavigationNode<T>
    {
        public override object DataSource
        {
            get { return base.DataSource; }
            set
            {
                this.Model = new EPiNavigationViewModel<T>(
                    value as IEnumerable<T>, 
                    HttpContext.Current.GetCurrentPage());
            }
        }
    }
}